/**
* @file SourceListReader.hpp
* Class to read and store the leapsec data.
*/

#ifndef GPSTK_SOURCE_LIST_READER_HPP
#define GPSTK_SOURCE_LIST_READER_HPP


//============================================================================
//
//  Shoujian Zhang, Wuhan University, 2013
//
//============================================================================


#include <iostream>
#include <string>
#include <set>
#include <map>
#include "CommonTime.hpp"
#include "DataStructures.hpp"

using namespace std;

namespace gpstk
{

      /** This class will read the source list from file.
       */

   class SourceListReader
   {
   public:


         /// Default constructor
      SourceListReader() {};


         /// Load the leap second data from input file
      void loadFile(std::string file)
         noexcept(false);


         /** Get the leap second at the given UTC time
          *
          *  @param t   the time given in UTC
          *
          */
      SourceIDSet getSourceSet() const
         noexcept(false);



         /// clear the all the data
      void clear()
      { sourceSet.clear(); }


         /// Default deconstructor
      virtual ~SourceListReader()
      { sourceSet.clear(); }


   private:

         /// Object holding all the leap second data
      SourceIDSet sourceSet;

   }; // End of class 'SourceListReader'

      // @}

}  // End of namespace gpstk


#endif   // GPSTK_SOURCE_LIST_READER_HPP
